home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Reference Guide / C-C++ Interactive Reference Guide.iso / c_ref / clesson / c.dir / 00158.png < prev    next >
Portable Network Graphic  |  1995-04-05  |  5.4 KB  |  455x178  |  1-bit (2 colors)
   ocr: Ihe variable iis initially assigned the value U.Then getchar()" gets a character from the keyboard, assigns it to "c", and tests to see ifit is a newline character. Ifit is not, the body ofthe "for" loop is executed. The value of"c"is assigned to the array element "name(i]. Macro "isalpha()" - is used to determine whether "c"is a lower- or uppercase letter. - sum" is incremented by the value of"c"ifitis.